package com.bs.core.dao.impl;

import java.util.List;

import org.beetl.sql.core.SQLManager;
import org.beetl.sql.ext.spring.SpringBeetlSql;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;

import com.bs.core.dao.BaseDao;
import com.bs.core.reflect.GenericsUtils;
import com.bs.utils.log.LogUtil;

/**********************************************************
 * Copyright © 2014，北京福富软件技术股份有限公司
 * All Rights Reserved.
 *
 * 文件名称：BaseDaoImpl.java 
 * 摘    要：
 *
 * 初始版本：1.0.0.0
 * 原 作 者：叶平平
 * 完成日期：2015-12-28 下午2:22:23
 * 
 ************************************************************/
public class BaseDaoImpl<T> implements BaseDao<T> {
	
	private static Logger logger = LogUtil.get();
	
	@Autowired
	private SpringBeetlSql beetlsql;
	
	private Class<T> entityClass;
	
	public BaseDaoImpl() {
		entityClass = GenericsUtils.getSuperClassGenricType(getClass());
	}
	
	public T save(T entity){
		SQLManager sqlManager = beetlsql.getSQLMananger();
		return null;
	}
	
	public T update(T entity){
		SQLManager sqlManager = beetlsql.getSQLMananger();
		return null;
	}
	
	public T delete(T entity){
		SQLManager sqlManager = beetlsql.getSQLMananger();
		return null;
	}
	
	public T updateBaseField(T entiry){
		SQLManager sqlManager = beetlsql.getSQLMananger();
		return null;
	}
	
	public List<T> queryBySql(String sql){
		SQLManager sqlManager = beetlsql.getSQLMananger();
		return null;
	}
	
	public List<T> queryBySql(String sql,Class clazz){
		SQLManager sqlManager = beetlsql.getSQLMananger();
		return null;
	}
	
	
}
